<%@ page language="java" pageEncoding="UTF-8"%>
<div class="container">
	<div class="row">
        <div class="col-sm-9 col-md-9">
        	<div class="panel panel-default">
				<div class="panel-body">
					<span class="label label-danger" ng-show="blog.blog.recommend_time!=null && blog.blog.recommend_time!=0">推荐</span>
					<span class="label label-danger" ng-show="blog.blog.oneself">私有</span>
					<span class="label label-warning">{{blog.blog.order.name}}</span>
					<h3>
						{{blog.blog.title}}
						
						<div class="btn-group pull-right" ng-show="blog.module!=null && blog.module.length!=0">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
								管理
								<span class="caret"></span>
							</button>
							<ul class="dropdown-menu" role="menu">
								<li ng-repeat="module in blog.module">
									<a href="javascript:void(0);" ng-click="handle(blog.blog,module)">{{module.name}}</a>
								</li>
							</ul>
						</div>
					</h3>
					<hr />
	
					<ol class="breadcrumb">
						<li>
							<a ng-href="#/user/{{blog.blog.author.id}}/home">空间</a>
						</li>
						<li>
							<a ng-href="#/user/{{blog.blog.author.id}}/blog">博客</a>
						</li>
						<li>
							<a ng-href="#/user/{{blog.blog.author.id}}/blog/{{blog.blog.catalog.id}}">{{blog.blog.catalog.name}}</a>
						</li>
						<li>
							发表于 {{blog.blog.create_time | formatDate}}
						</li>
						<li>
							浏览:{{blog.blog.views_count}}
							评论:{{blog.blog.comment_count}}
						</li>
						<span class="pull-right">
							<span style="cursor: pointer;" ng-click="favorite.create(blog)" ng-show="blog.favorite==null || !blog.favorite" message="'收藏'" tooltip>
								<i class="glyphicon glyphicon-star-empty"></i>
							</span>
							
							<span style="cursor: pointer;" ng-click="favorite.remove(blog)" ng-show="blog.favorite" message="'取消收藏'" tooltip>
								<i class="glyphicon glyphicon-star"></i>
							</span>
							收藏 + {{blog.blog.favorite_count}}
						</span>
					</ol>
	
					<div ng-show="blog.blog.oneself && blog.blog.content==null">
						<div class="alert alert-warning"><i class="glyphicon glyphicon-exclamation-sign"></i> 该博文为私有</div>
					</div>
					
					<div ng-show="blog.blog.content!=null">
						<source model="blog.blog.content"></source>
					</div>
				</div>
			</div>
	
			<div class="panel panel-default">
				<div class="panel-heading">
					<i class="glyphicon glyphicon-comment"></i> 评论
				</div>
				<div class="panel-body">
					
					<div ng-show="!blog.blog.comment">
						<div class="alert alert-warning"><i class="glyphicon glyphicon-exclamation-sign"></i> 该博客已禁止评论</div>
					</div>
					
					<div ng-show="blog.blog.comment">
						<comment id="blog.blog.comment_id"></comment>
					</div>
				</div>
			</div>
        </div>
        
       <div class="col-sm-3 col-md-3">
			<user-card uid="blog.blog.author.id"></user-card>
       	
       		<blog-catalog-include uid="blog.blog.author.id"></blog-catalog-include>
       		
       		<div class="panel panel-default" ng-show="blog.related!=null && blog.related.length!=0">
				<div class="panel-heading">
					相关博客
				</div>
				<div class="panel-body">
					<table class="table table-hover">
						<tr ng-repeat="related in blog.related">
							<td>
								<a ng-href="#/blog/{{related.id}}" title="{{related.title | textOnly}}">
									{{related.title | textOnly}}
								</a>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
    </div>
</div>